import { Router } from 'express';
import authRoutes from './auth';
import userRoutes from './users';
import uploadRouter from './common/upload';
import vodUploadRouter from './common/vodupload';
import ocrRouter from './common/upload2ocr';
import adminUserRoutes from './adminUser';
import dictionaryRoutes from './dictionary';
import messageRoutes from './message';
import homeModuleRoutes from './home';
import contentRoutes from './content';
import policyRoutes from './policy';

const router = Router();

// 注册所有路由
router.use('/', authRoutes);  // 处理 /api/login, /api/captcha 等认证相关路由
router.use('/users', userRoutes);  // 处理 /api/users/* 相关路由
router.use('/upload', uploadRouter);  // 处理 /api/upload/* 相关路由
router.use('/ocr', ocrRouter);  // 处理 /api/ocr/* 相关路由
router.use('/adminUser', adminUserRoutes);  // 处理 /api/adminUser/* 相关路由
router.use('/dictionary', dictionaryRoutes);  // 处理 /api/dictionary/* 相关路由
router.use('/messages', messageRoutes);  // 处理 /api/messages/* 相关路由
router.use('/home', homeModuleRoutes);  // 处理 /api/home/* 相关路由
router.use('/content', contentRoutes);  // 处理 /api/content/* 相关路由
router.use('/policy', policyRoutes);  // 处理 /api/policy/* 相关路由

export default router; 